<template>
    <div>

        <!-- 轮播图区域 -->

            <!-- 组件中使用v-for循环的话，一定要使用key -->
        <!-- <mt-swipe :auto="4000">
            <mt-swipe-item v-for="item in lunbotuList" :key="item.id">
                <img :src="item.image" alt="">  
            </mt-swipe-item>
        </mt-swipe> -->
        <swipper :lunbotuList="lunbotuList" :isfull="true"></swipper>

        <!-- 九宫格 -->
        <ul class="mui-table-view mui-grid-view mui-grid-9" style="background-color:#fff;border:0">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/newslist">
                    <img src="src/images/资讯.jpg" alt="" style="width:60px;height:60px">
                    <div class="mui-media-body">新闻资讯</div></router-link> </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/photolist">
                    <img src="src/images/图片分享.png" alt="" style="width:60px;height:60px">
                    <div class="mui-media-body">图片分享</div></router-link></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
                <router-link to="/home/goodslist">
                     <img src="src/images/商品购买.png" alt="" style="width:60px;height:60px">
                    <div class="mui-media-body">商品购买</div></router-link></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                    <img src="src/images/留言反馈.png" alt="" style="width:60px;height:60px">
                    <div class="mui-media-body">留言反馈</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                    <img src="src/images/视频专区.png" alt="" style="width:60px;height:60px">
                    <div class="mui-media-body">视频专区</div></a></li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="#">
                    <img src="src/images/联系我们.png" alt="" style="width:60px;height:60px">
                    <div class="mui-media-body">联系我们</div></a></li>
        </ul> 

    </div>
</template>
<script>
import swipper from '../subcomponents/swipper.vue'
export default {
    data(){
        return{
            lunbotuList :[]//保存轮播图的数组
        }
    },
    created(){
        this.getlunbo();
    },
    methods:{
        getlunbo(){
            this.$http.get("src/json/test.json").then(result => {
                console.log(result.body)
                this.lunbotuList = result.body.message
            })
        }
    },
    components:{
        swipper
    }

}
</script>
<style scoped>
    .mint-swipe{
        height: 200px;
    }
    img{
        width: 100%;      
        height: 100%;      

    }
    .mui-grid-view.mui-grid-9{
        background-color: #fff;
        border: 0;
    }
    .mui-grid-view.mui-grid-9 .mui-table-view-cell{
        border:0
    }
</style>

